home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Reference Guide
/
C-C++ Interactive Reference Guide.iso
/
c_ref
/
csource4
/
208_01
/
libc.dat
< prev
next >
Wrap
Text File
|
1987-10-13
|
13KB
|
619 lines
/*
HEADER: CUG208.15;
TITLE: Clib Table of Contents;
DESCRIPTION: "Information about DR C library functions";
SYSTEM: CP/M68K;
FILENAME: LIBC.DAT;
AUTHORS: Yoshimasa Tsuji;
*/
The following are the table of contents of "clib" as supplied by DRI.
It is created by UNIX nm with my comments appended.
Note: the subroutines are also found in s.o, lib[e|f].a and
pseudo-subroutines of one type is found as macros in *.h files,
(assert() has bugs)
but pseudo-subroutines of another type i.e. asm() etc. are too
useful to be documented.
UNIX ld requires space(s) after -u option, but DRI's lo68 does not.
channel5.o: \ channels for five file descriptors
channel initialisation, allocation, initialisation, checking, free
channels.
To link:
-u _maxfile5
00000090 T ___chini
00000008 T __allocc
0000006E T __chinit
000000FE T __chkc
00000000 D __chvec
00000384 C __fds
00000052 T __freec
00000000 T _maxfile
xmainnw.o:
\ front end of command line processor. Wild card expansion
of cpm open file function is not called.
To link:
-u _nowildcard
00000000 T ___main
00000292 T _nowildc
mallocdb.o:
/ gives detailed diagnostics of malloc() error
To link:
-u _malloc_
00000000 T __errmal
00000056 T _malloc_
noascii.o:
/ read() and write() is not going to call ascii mode files
tell the linkage editor _noascii as undefined
00000000 D ___noasc
00000008 T __rdasc
0000001C T __wrtasc
00000000 T _noascii
nobinary.o:
/ read() and write() is not going to use binary files
tell the linkage editor that _nobinary is undefined
00000000 D ___nobin
00000008 T __rdbin
0000001C T __wrtbin
00000000 T _nobinar
nodisk.o:
/ read() and write() are not going to use disk files.
linked when _nodisk is specified as undefined
00000000 D ___nodis
00000008 T __rdasc
0000001C T __rdbin
00000030 T __wrtasc
00000044 T __wrtbin
00000000 T _nodisk
nofilesz.o:
/ when lseek from end of file is not going to be used or
_filesz() is not called, lseek() can be smaller if
_nofilesize is specified as undefined
00000008 T __filesz
00000000 T _nofiles
nofloat.o:
\\ printf() and related functions are not going to use
floating point expression.
specify _nofloat as undefined
00000000 D ___noflo
00000044 T __atof
00000008 T __petoa
0000001C T __pftoa
00000030 T __pgtoa
00000000 T _nofloat
nolong.o:
\\ printf() and related functions are not going to use
'long' type expressions.
specify _nolong as undefined
00000000 D ___nolon
00000008 T ___prtld
00000000 T _nolong
nottyin.o:
// when tty input is not going to be employed, specify
that _nottyin is undefined
00000008 T __ttyin
00000000 T _nottyin
access.o:
\\ just opens and closes. see UNIX manuals for usage.
00000000 T _access
\\ does not even change CP/M defines attributes (directory bit and
write enable bits that are the bit 7 of the file name extension)
SHOULD be fixed
00000044 T _chmod
00000058 T _chown
atoi.o:
00000000 T _atoi
atol.o:
// variant of atoi() : long != int
00000000 T _atol
calloc.o:
// note that the total storage bytes cannot exceed 0x10000 - $200
due to a bug, your calloc may not allow the product of element
and size to exceed 0x7fff bytes
00000038 T _calloc
00000000 T _zalloc
// zalloc is a variant of calloc, but explicitly zeros the
allocated area.
exec.o:
/ see UNIX manual for usage
_execl family can be implemented easily excepting those that
returns to the caller or processes the third argument of main()
00000000 T _execl
fdopen.o:
// funny bug: fdopen(fd,"foo") is taken for fdopen(fd,"w")
00000000 T _fdopen
fgets.o:
00000000 T _fgets
fopen.o:
00000000 T __fopen
0000011C T _fopen
00000134 T _fopena
0000014C T _fopenb
fputs.o:
00000000 T _fputs
fread.o:
// enables you to read more than 0x10000 bytes at a time
00000000 T _fread
freopen.o:
00000000 T __freope
00000120 T _freopa
00000140 T _freopb
00000100 T _freopen
fseek.o:
00000000 T _fseek
00000054 T _rewind
ftell.o:
00000000 T _ftell
fwrite.o:
// enables you to write more than 0x10000 bytes at a time
00000000 T _fwrite
getl.o:
// variant of getw()
00000000 T _getl
getpass.o:
00000000 T _getpass
gets.o:
00000000 T _gets
getw.o:
// EOF can be detected by feof().
//****** EOF pitfall *****
// while((c = getchar()) != EOF)
// putchar(c);
// is nonsense if the stream is binary because 0xff is a valid character
//***** end of a chat ****
// e.g. 'a',EOF sequence will be 0xff61
00000000 T _getw
main.o:
// does jobs left undone by s.o
00000000 T __main
mktemp.o:
// this is buggy. write your own or port from UNIX
// trick: put six or more trailing 'X's, and if the generated name
// already exists, generate another.
00000000 T _mktemp
getpid.o:
// just for compatibility
00000000 T _getpid
optoff.o:
// used when some functions are trimmed. Means "optionally
trimmed." -- that is, by specifying them as undefined.
00000000 T __optoff
perror.o:
// very useful. see UNIX manual for usage. regretted that
's.o' as supplied does not set the bdos return value
to ___cpmrv
00000000 T _perror
00000012 D _sys_err
00000010 D _sys_ner
printf.o:
00000022 T _fprintf
00000000 T _printf
putl.o:
00000000 T _putl
puts.o:
00000000 T _puts
putw.o:
00000000 T _putw
qsort.o:
// as the product of two int's is int, the product of element and
// size cannot exceed 0x7fff bytes. Just eliminate one
// statement after the multiplication ( ext.l )
00000000 T _qsort
rand.o:
// the seed is masked by 0x3f.
00000000 T _rand
00000066 T _srand
readl.o:
// read() handles unsigned int numbers of bytes, thus this one
00000000 T _readl
rename.o:
// rename(from, to)
// see UNIX manual( BSD 4.2). Note that being different from 'link'
file name should not be renamed when it is opened but not closed
00000000 T _rename
strrchr.o:
00000036 T _rindex
00000000 T _strrchr
scanf.o:
00000022 T _fscanf
00000000 T _scanf
setbuf.o:
00000000 T _setbuf
sgtty.o:
// gtty() and stty() SHOULD be re-written
00000048 T _gtty
00000000 T _stty
sscanf.o:
00000000 T _sscanf
doscan.o:
00000000 T __doscan
fgetc.o:
// is implemented as a subroutine
00000000 T _fgetc
filbuf.o:
// _fillbuf() in K & R
00000000 T __filbuf
read.o:
00000000 T _read
readasc.o:
00000000 T __rdasc
readbin.o:
00000000 T __rdbin
swab.o:
00000000 T _swab
ttyin.o:
// contractor to read(). reads tty input.
// _ttyin(fp,buf,nbytes)
// if 0x1a is input, 0a will not be appended.
00000000 T __ttyin
ttyinraw.o:
// called by getpass()
may be documented in your local manual, but has a BUG.
BDOS function #6 is NOT compatible with other CP/Ms.
00000000 T __ttyinr
00000058 T _ttyinra
ungetc.o:
00000000 T _ungetc
unlink.o:
// erases from directory
00000000 T _unlink
writel.o:
// write() handles less than 0x10000 bytes, thus this one.
00000000 T _writel
xmain.o:
// another post processor of 's.o'.
this module handles wild card expansion using BDOS open function
00000000 T ___main
creat.o:
00000000 T __creat
000000B6 T _creat
000000CE T _creata
000000E6 T _creatb
exit.o:
00000000 T _exit
cleanup.o:
// companion subroutine for exit()
00000000 T __cleanu
fclose.o:
00000000 T _fclose
close.o:
00000000 T _close
fdecls.o:
// area for buffered read/write
00000000 T ___fdecl
00000000 D __iob
fflush.o:
00000000 T _fflush
open.o:
00000000 T __open
000000F4 T _open
0000010C T _opena
00000124 T _openb
lseek.o:
// there is one byte bug, due to which you cannot write
some distance past the current end of file.
00000000 T _lseek
000000AE T _tell
filesz.o:
// long _filesz(fd)
// computes the size of an ascii file correctly,
but does not do properly with regards to binary files
headed with MAGIC strings.
00000000 T __filesz
sprintf.o:
00000000 T _sprintf
doprt.o:
// primary module of printf() family
00000000 T __doprt
doprtfp.o:
// handles F format part of printf() family
00000038 T __petoa
00000000 T __pftoa
00000070 T __pgtoa
fputn.o:
// fputn(buff, nbytes, stream)
// unsigned nbytes;
// much like fwrite()
00000000 T _fputn
fputc.o:
// this is implemented as a subroutine, not as a macro
00000000 T _fputc
flsbuf.o:
// _flushbuf() in K & R
00000000 T __flsbuf
isatty.o:
00000000 T _isatty
00000034 T _isdev
00000060 T _ttyname
malloc.o:
// despite description of the DRI's manual, you could
get up to 0x10000-0x200 bytes by declaring the parameter
as unsigned. However, due to a one byte bug in 's.o'
the returned area is not zero filled if the space exceeded
0x7fff bytes.
00000008 D __aflist
00000000 D __afreeb
0000018E T _free
00000000 T _malloc
0000028C T _realloc
mallocnd.o:
// gives half-hearted diagnostics to malloc() error
malloc debugger can be linked by option
00000008 T __errmal
00000000 T _malloc_
prtint.o:
// processes int conversion of doprt.c
00000000 T ___prtin
prtld.o:
// handles long decimal conversion of doprt.c
00000000 T ___prtld
prtshort.o:
// print short int of doprt.c
00000000 T ___prtsh
sbrk.o:
00000000 T _sbrk
write.o:
// can handle 'unsigned int' bytes
00000000 T _write
channels.o:
// opens 16 channels and manages file descriptors
00000088 T ___chini
00000000 T __allocc
00000066 T __chinit
000000F6 T __chkc
00000000 D __chvec
00000B40 C __fds
0000004A T __freec
writeasc.o:
00000000 T __wrtasc
writebin.o:
00000000 T __wrtbin
blkio.o:
// checks whether cp/m68k can read/write up to 16K bytes at time
, but eventually does 128 bytes again and again.
00000000 T __blkio
osattr.o:
// check what abilities the current cp/m version has
00000000 D _os_abil
00000002 D _os_vers
00000000 T _osattr
wrtchr.o:
00000000 T __wrtchr
lstout.o:
// does not handle sgtty info. Must be re-written so that
XTAB and CRLF be properly handled.
00000000 T __lstout
ttyout.o:
// does not handle sgtty info. MUST BE re-written
00000000 T __ttyout
xopen.o:
// internal function of open()
00000000 T ___open
chkuser.o:
// cp/m68k allows to use user_number like a subdirectory.
this function checks the current user number.
00000000 T __chkuse
00000050 T __uchkus
errno.o:
00000002 D __errcpm
00000000 D _errno
strchr.o:
// this routine is loaded in 's.o' already
0000002C T _index
00000000 T _strchr
parsefn.o:
// _parsefn(filename, fcb)
// parses file name by actually calling bdos open file function
00000000 T __parsef
blkfill.o:
// blkfill(buf,c,count)
// already loaded in 's.o'. useful. fills area with one byte pattern.
00000000 T _blkfill
blkmove.o:
// blkmove(to, from, nn)
// moves bytes considering overlapping
00000000 T _blkmove
strcat.o:
00000000 T _strcat
strcmp.o:
00000000 T _strcmp
strncat.o:
00000000 T _strncat
strncmp.o:
00000000 T _strncmp
strncpy.o:
// bug free.
00000000 T _strncpy
strcpy.o:
00000000 T _strcpy
strlen.o:
00000000 T _strlen
ctype.o:
00000000 T ____atab
00000000 D ___atab
xstrcmp.o:
// a variant of strcmp. ignores cases.
00000000 T __strcmp
yesfloat.o:
00000000 T _nofloat
yesstart.o:
00000000 T _nostart
xatof.o:
00000000 T __atof
abort.o:
00000000 T _abort
// arithmetic on long ----
aldiv.o:
00000000 T _aldiv
00000000 T aldiv
almul.o:
00000000 T almul
alrem.o:
00000000 T _alrem
00000004 C _ldivr
00000000 T alrem
ldiv.o:
00000000 T _ldiv
00000004 C _ldivr
00000000 T ldiv
lmul.o:
00000000 T lmul
lrem.o:
00000004 C _ldivr
00000000 T _lrem
00000000 T lrem
salloc.o:
// is this documented in your manual?
00000000 T __salloc
setjmp.o:
00000012 T _longjmp
00000000 T _setjmp
// again, arith on long
uldiv.o:
00000000 T _uldiv
00000000 D _uldivr
signal.o:
// SIGINT, SIGTERM can be implemented, though currently unavailble.
MC68000 defined exceptions are caught properly. superb in debugging.
see UNIX tutorials for the detailed usage.
00000114 T __setvec
00000000 T _signal
xsignal.o:
// the following are currently supported as signal() parameters
00000036 T __arith
00000028 T __buserr
00000000 T __illins
00000010 T __trace
0000001C T __trap
blivot.o:
// does nothing. DRI may want to list their name in the user created
product.
re-write 's.s' so that it does not call _sw_
00000000 T _sw_